// layouts文件夹下的index.tsx约定为项目的公共的布局的组件
// 通常可以用来做重定向
import { Outlet, useLocation, Navigate } from "umi";

const Index = () => {
  const location = useLocation();
  if (location.pathname === "/") {
    return <Navigate to="/home"></Navigate>;
  } else {
    return (
      <>
        <div>123</div>
        <Outlet />
      </>
    );
  }
};

export default Index;
